# import os
# readPath='/home/dcl-zm/tof_work2/tof_data/output'
# img = '13.png'
# print(os.path.join(readPath,img))

# import getpass
# password = getpass.getpass("Enter your password: ")  #隐藏显示
# print("Your password is", password)


# import keyboard  #linux下keyboard需要root权限
# def on_key_press(event):
#     print("You pressed", event.name)
# keyboard.on_press_key("a", on_key_press)

# from getkey import getkey
# while True:
#     key = getkey()
#     print(key)



# import pyautogui
# if pyautogui.keyDown('shift'):
#     print("You pressed the Shift key")


#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
ZetCode PyQt4 tutorial
In this example, we reimplement an
event handler.
author: Jan Bodnar
website: zetcode.com
last edited: October 2011
"""
import sys
"""
Override(覆盖) 槽函数
"""
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
import sys

class OverrideSlot(QWidget):
    def __init__(self):
        super(OverrideSlot, self).__init__()
        self.setWindowTitle("Override(覆盖) 槽函数")

    def keyPressEvent(self, e):
        if e.key() == Qt.Key_Escape:
            self.close()
        elif e.key() == Qt.Key_Alt:
            self.setWindowTitle("按下Alt键")

if __name__ == "__main__":
    app = QApplication(sys.argv)

    main = OverrideSlot()
    main.show()

    sys.exit(app.exec_())